vcComponentCreator
vcComponentCreator uses a component as a template for creating other components.
See in: Overview
Module: vcBehaviors
Parent: vcContainer
Children -
Referenced by: -
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| BlockingOptimization | Boolean | RW | Gets or sets value for the optimization of creator when making new components, thereby improving simulation performance.See moreIf True, the creator will not check for capacity rather listen for event. The creator is informed, for example by component or capacity controller, when there is capacity to make a new component. |
| Interval | Real | RW | Gets or sets the interval (in seconds) for creating components. |
| Limit | Integer | RW | Gets or sets the maximum number of components that can be created by creator during a simulation. |
| Part | String | RW | Gets or sets the URI or VCID of template component. |
| TemplateComponent | vcComponent | RW | Gets or sets the template used by creator to create new components during a simulation. Either this property or Part can be used to define the template component of creator. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| create | vcComponent | Optional Keyword[wait = Boolean] | Creates a new component from template.See moreAn optional wait argument can be given to use BlockingOptimization. If creation fails, returns None. Generally, this occurs when the template is undefined or because of capacity issues. Tip: Set the Limit property to zero in order to disable the internal logic of the creator. Arguments: Optional: wait (bool): False by default. If True, the creator waits for capacity before trying to make a component. Returns: vcComponent: created component or None if it was not created. Exceptions: InvalidArgument: When this class is not owned by any node. RuntimeError: When the object is owned by a node, but the owning node is not attached to any world. RuntimeError: When the attached world does not have a valid simulation object. RuntimeError: When it is called when simulation is not running. |